home *** CD-ROM | disk | FTP | other *** search
/ TeX 1995 July / TeX CD-ROM July 1995 (Disc 1)(Walnut Creek)(1995).ISO / tex-k / tex-k-archive.past / tex-k-archive.gz / tex-k-archive / 000064_fj@iesd.auc.dk_Sun Oct 17 21:35:02 1993.msg < prev    next >
Internet Message Format  |  1994-10-11  |  2KB

  1. Received: from iesd.auc.dk by cs.umb.edu with SMTP id AA09154
  2.   (5.65c/IDA-1.4.4 for <tex-k@cs.umb.edu>); Sun, 17 Oct 1993 15:35:34 -0400
  3. Received: from loke.iesd.auc.dk by iesd.auc.dk with SMTP id AA13119
  4.   (5.65c8/IDA-1.5/MD); Sun, 17 Oct 1993 20:33:35 +0100
  5. Received: by loke.iesd.auc.dk id AA27138
  6.   (5.65c8/IDA-CLIENT/MD); Sun, 17 Oct 1993 20:35:02 +0100
  7. Date: Sun, 17 Oct 1993 20:35:02 +0100
  8. From: Frank Jensen <fj@iesd.auc.dk>
  9. Message-Id: <199310171935.AA27138@loke.iesd.auc.dk>
  10. To: karl@cs.umb.edu
  11. Cc: tex-k@cs.umb.edu
  12. In-Reply-To: <199310131932.AA01949@terminus.cs.umb.edu> (karl@cs.umb.edu)
  13. Subject: Re: Speed of (recursive) search in the Kpathsearch library
  14.  
  15.  
  16. Karl> Frank's idea of using ls -R output to speed up the file searching is
  17. Karl> interesting, but, as he says, has the disadvantage of maintaining
  18. Karl> another file that will inevitably be out of date.
  19.  
  20. Well, I wouldn't put it as strongly as ``inevitably be out of date.''
  21. I'm sure, I would remember to keep the file up-to-date, or at least
  22. diagnose the problem if I forget it :-)
  23.  
  24. I would only use this mechanism for the system directories (which
  25. rarely change), not for my private directories.  This is simply
  26. because my private directories are small, and a database for these
  27. files won't give much speed-up.
  28.  
  29. Anyway, one can always ignore this feature if one so desires.
  30.  
  31. Karl> Maybe another caching strategy would work well enough and wouldn't have
  32. Karl> that lossage: when a file is found in a given directory, move that dir
  33. Karl> to the head of the list.  My impression is that most jobs use a lot of
  34. Karl> files in a few directories.
  35.  
  36. Hmm, let me see.  Inspecting the LaTeX log file from my latest paper,
  37. I see that 12 files are being read; they are distributed in 5
  38. directories, one of which is the current directory from where 5 files
  39. are read.  I note that the files read from the current directory are
  40. found quickly, whereas the other files takes somewhat longer to find.
  41. However, quite long time elapses before the first file is read; this
  42. is primarily the time taken to set up the directory list.
  43.  
  44. This indicates to me that the heuristic of rearranging the directory
  45. list as Karl suggests won't work well enough in practice.
  46.  
  47. I therefore strongly suggest that such a feature be built into the
  48. Kpathsearch library, perhaps as a compile-time option.  I will even
  49. volunteer to code it (since I already have a half-finished version).
  50.  
  51. /Frank